home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / adaed / gwudemos / screen.adb < prev    next >
Encoding:
Text File  |  1996-01-30  |  860 b   |  33 lines

  1. WITH Text_IO;
  2. WITH My_Int_IO;
  3. PACKAGE BODY Screen IS
  4.  
  5. -- Procedures for drawing pictures on ANSI Terminal Screen
  6. -- These procedures will work correctly only if the actual
  7. -- terminal is ANSI compatible. ANSI.SYS on a DOS machine
  8. -- will suffice.
  9.  
  10.   PROCEDURE Beep IS
  11.   BEGIN
  12.     Text_IO.Put (Item => ASCII.BEL);
  13.   END Beep;
  14.  
  15.   PROCEDURE ClearScreen IS
  16.   BEGIN
  17.     Text_IO.Put (Item => ASCII.ESC);
  18.     Text_IO.Put (Item => "[2J");
  19.   END ClearScreen;
  20.  
  21.   PROCEDURE MoveCursor (To: IN Position) IS
  22.   BEGIN                                                
  23.     Text_IO.New_Line;
  24.     Text_IO.Put (Item => ASCII.ESC);
  25.     Text_IO.Put ("[");
  26.     My_Int_IO.Put (Item => To.Row, Width => 1);
  27.     Text_IO.Put (Item => ';');
  28.     My_Int_IO.Put (Item => To.Column, Width => 1);
  29.     Text_IO.Put (Item => 'f');
  30.   END MoveCursor;  
  31.  
  32. END Screen;
  33.